<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .artbox{
      text-align: center;
    }
 table{
     margin: 0 auto;
 }
 table img{
     width: 50px;

 }
 .title{
     width: 200px;
     height: 20px;
     overflow: hidden;
 }
 td{
     margin: 0 12px;
     padding: 5px 11px;
     text-align: center;
 }
.time{
    font-size: 12px ;
 
}
a{
    text-decoration: none;
    color: red;
}
.red{
    color: red;
}   
.addtext{
    /* width: 600px; */
    text-align: center;
    border: 1px solid #ccc;
    display: flex;
    justify-content: center;
    margin:  0 auto;
  
}
.add,.edit{
    color: red;
    cursor: pointer;
}
.upda{
    width: 600px;
    margin: 0 auto;
    background-color: rgb(199, 189, 189);
    overflow: hidden;
    display: flex;

}
.c-red{
    color: red;
}
.c-green{
    color: green;
}
.c-ccc{
    color: rgb(112, 111, 111);
}

.yl img{
    width: 150px;
    
}

</style>
<body>  
  <h1><img src="" ></h1>  
  <img src="/" alt="">
    <div class="artbox" >
        <span> 文件列表</span>  <a href="/">返回</a>
        <table border="1" rules="all"  class="layui-table" lay-skin="line" >
            <tr>
            <th>序号</th>
              <th>标题</th>
              <th>内容</th>
              <th>封面</th>
              <th>所属分类</th>
              <th>作者</th>
              <th>统计时间</th>
              <th>状态</th>
              <th>操 作</th>
            </tr>
            <div>
            {{each articles item index}} 
            <tr>
                <td>{{ index+1 }}</td>
                <td><div class="title">{{ item.title }}</div> </td>
                <td><div class="title">{{ item.content |  removeHtml}}</div> </td>
                <td>    
                    <img src="{{ item.img_url }}" >
                </td>
          
                <td>{{ item.classify }}</td>
                <td>{{ item.author }}</td>
                <td class="time">{{ item.add_time | dateFormat "YYYY-MM-DD  hh:mm"}}</td>
                <td class="time">{{@ item.statu3 }}</td>
                <td class="time"> 
                <a href="javascript:"  class="layui-btn layui-btn-sm layui-btn-danger" onclick="confirmReback('{{item.art_id}}');" >还原</a> 
                <a href="javascript:" class="layui-btn layui-btn-sm layui-btn-danger" onclick="confirmDelete('{{item.art_id}}','{{item.img_url}}');" >永久删除</a> 
                </td>
              </tr>
            {{/each}}
         
        </div>
          </table>
    </div>
    
</body>
<script src="https://s3.pstatp.com/cdn/expire-1-M/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/layer/3.5.1/layer.js"></script>

<script>

//永久删除
function confirmDelete(id,url){
    layer.confirm('确认永久删除吗？', {
  btn: ['确认','非常确认'] //按钮
}, function(){
  location.href="/dele?id="+id+"&url="+url;
});
}
function confirmReback(id){
    layer.confirm('确认还原吗？', {
  btn: ['确认','非常确认'] //按钮
}, function(){
  location.href="/Reback?id="+id;
});
}
// console.log( $("input[name='status']").eq(1).val()  );


</script>
</html>